home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 25
/
CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso
/
CUCD
/
WWW
/
http
/
www.wirenet.co.uk
/
files
/
thor25_arexx.lha
/
CygnusEd
/
CancelEvent.ced
next >
Wrap
Text File
|
1996-07-01
|
2KB
|
68 lines
/* $VER: CancelEvent.ced 1.1 (24.6.96)
by Remco van Hooff
based on the ged version by Troels Walsted Hansen
Quit CED without saving and delete the event in THOR.
Install it under a function key in CED (don't put 'rx' infront of it!)
HISTORY
1.1 - Fixed a problem with the Thor ARexx port.
- Will now work correctly with multiple CEDs open.
*/
options results
/* quit without saving */
'status 21'
filename = result
'Quit & die 1'
p=' '||ADDRESS()||' '||SHOW('P',,)
IF POS(' THOR.',p)>0 THEN thorport=WORD(SUBSTR(p,POS(' THOR.',p)+1),1)
ELSE DO
SAY 'THOR port not found!'
EXIT 10
END
IF ~SHOW('p', 'BBSREAD') THEN DO
ADDRESS COMMAND
"run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
"WaitForPort BBSREAD"
END
ADDRESS(thorport)
CURRENTBBS stem CURRENT
IF(RC ~= 0 | CURRENT.BBSNAME ~= "") THEN bbs = CURRENT.BBSNAME
ELSE EXIT
ADDRESS(bbsread)
GETBBSDATA '"'bbs'"' stem BBSDATA
IF(RC ~= 0) THEN DO
ADDRESS(thorport)
REQUESTNOTIFY TEXT '"'BBSREAD.LASTERROR'"' BT '"_Ok"'
EXIT 5
END
DO i=BBSDATA.FIRSTEVENT TO BBSDATA.LASTEVENT
DROP MSGTAGS.
READBREVENT BBSNAME '"'bbs'"' EVENTNR i TAGSSTEM MSGTAGS
IF(RC ~= 0) THEN DO
ADDRESS(thorport)
REQUESTNOTIFY TEXT '"'BBSREAD.LASTERROR'"' BT '"_Ok"'
EXIT 5
END
IF(filename = MSGTAGS.MSGFILE) THEN DO
UPDATEBREVENT BBSNAME '"'bbs'"' EVENTNR i SETDELETED
IF(RC ~= 0) THEN DO
ADDRESS(thorport)
REQUESTNOTIFY TEXT '"'BBSREAD.LASTERROR'"' BT '"_Ok"'
EXIT 5
END
EXIT
END
END
EXIT